<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta content=always name=referrer>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <link rel="stylesheet" type="text/css" href="__STATIC__/css-wap/swiper.min.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/css-wap/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/css-wap/style.css">
    <script src="__STATIC__/js-wap/jquery-1.11.3.min.js"></script>
    <script src="__STATIC__/js-wap/swiper.min.js"></script>
    <script src="__STATIC__/js-wap/common.js"></script>

    <title>竞拍专区</title>
    <script>
        $(function () {
            var h = $(".media-left").height();
            $(".media-body").css({height:h+"px"});
        })
    </script>
</head>
<body>
<div class="wrap">
    <div class="header-main">
        <a href="{:url('mobile/auction/auction_list')}"><img src="__STATIC__/img-wap/back.png" class="back"></a>
        <span class="title">竞拍专区</span>
        <!--<a href="#"><img src="__STATIC__/img-wap/share.png" class="share"></a>-->
    </div>
    <div class="auction-con">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                {volist name="banner_list" id="vo"}
                <div class="swiper-slide"><img src="/{$vo.picUrl}"><div class="title">结拍时间：{:date('m-d H:i',$end_time)}</div></div>
                {/volist}
            </div>
        </div>
        <script>
            var swiper = new Swiper('.swiper-container', {
                pagination: '.swiper-pagination',
                paginationClickable: true,
                spaceBetween: 0,
                centeredSlides: true,
                autoplay: 2500,
                autoplayDisableOnInteraction: false
            });
        </script>
    </div>
    <div class="auction-content" id="main">


    </div>

</div>
</body>
{include file="public/src" /}
<script>
    //layer流加载
    layui.use('flow', function() {
        var $ = layui.jquery;
        var flow = layui.flow;
        flow.load({
            elem: '#main' //流加载容器
            ,isAuto:true
            ,isLazyimg:true
            ,done: function(page, next){ //执行下一页的回调
                var lis = [],
                        id = $('#id').val();
                $.ajax({
                    url:"",
                    dataType:'json',
                    type:'post',
                    data:{'page':page,'id':id},
                    success:function(t){
                        layui.each(t.data, function(index, item){
                            lis.push('<div class="main  first" onclick="jump_spot('+item.id+');"><div class="media"><div class="media-left media-middle"><img class="media-object" src="/'+item.picUrl+'">'+
                                    '</div><div class="media-body"><h4 class="media-heading">'+item.title+'</h4><div class="cur_price">当前价格：<span class="pri">￥'+item.deal_price+
                                    '</span><span class="num">('+item.person+'人）</span></div><div class="time">结拍时间：'+t.time+'</div></div></div></div>'
                            );
                        });
                        next(lis.join(''), page < t.pages);
                    }
                })
            }
        });
    });

    function jump_spot(id) {
        sessionStorage.setItem('spot_url_back',window.location.href);
        window.location.href = "{:url('mobile/auction/spot')}?id="+id;
    }
</script>
</html>